-
Notifications
You must be signed in to change notification settings - Fork 707
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix benchmark failures when using insecure_zero_ed
flag
#5354
Fix benchmark failures when using insecure_zero_ed
flag
#5354
Conversation
@TarekkMA can you please add a |
Review required! Latest push from author must always be reviewed |
Currently, when the pallet is compiled with the `insecure_zero_ed flag`, benchmarks fail because the minimum balance is set to zero. The PR aims to resolve this issue by implementing a placeholder value for the minimum balance when the `insecure_zero_ed` flag is active. it ensures that benchmarks run successfully regardless of whether this flag is used or not
@@ -31,6 +31,14 @@ const SEED: u32 = 0; | |||
// existential deposit multiplier | |||
const ED_MULTIPLIER: u32 = 10; | |||
|
|||
fn minimum_balance<T: Config<I>, I: 'static>() -> T::Balance { | |||
if cfg!(feature = "insecure_zero_ed") { | |||
100u32.into() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is not really correct, min balance is 0
in this case. I would rather fix specifically failing bench/es. this might lead to a wrong benchmark at least with insecure_zero_ed
feature enabled
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't check all of them, but most of them are just using this to set some balance or whatever. I don't think there is any problem in using 100
if the ED is zero.
1c4141a
* master: (39 commits) short-term fix for para inherent weight overestimation (#5082) CI: Add backporting bot (#4795) Fix benchmark failures when using `insecure_zero_ed` flag (#5354) Command bot GHA v2 - /cmd <cmd> (#5457) Remove pallet::getter usage from treasury (#4962) Bump blake2b_simd from 1.0.1 to 1.0.2 (#5404) Bump rustversion from 1.0.14 to 1.0.17 (#5405) Bridge zombienet tests: remove old command (#5434) polkadot-parachain: Add omni-node variant with u64 block number (#5269) Refactor verbose test (#5506) Use umbrella crate for minimal template (#5155) IBP Coretime Polkadot bootnodes (#5499) rpc server: listen to `ipv6 socket` if available and `--experimental-rpc-endpoint` CLI option (#4792) Update approval-voting-regression-bench (#5504) change try-runtime rpc domains (#5443) polkadot-parachain-bin: Remove contracts parachain (#5471) Add feature to allow Aura collator to use full PoV size (#5393) Adding stkd bootnodes (#5470) Make `PendingConfigs` storage item public (#5467) frame-omni-bencher maintenance (#5466) ...
Currently, when the pallet is compiled with the
insecure_zero_ed flag
, benchmarks fail because the minimum balance is set to zero.The PR aims to resolve this issue by implementing a placeholder value for the minimum balance when the
insecure_zero_ed
flag is active. it ensures that benchmarks run successfully regardless of whether this flag is used or not